﻿#ifndef _WINDOWS_
#define _WINDOWS_

#pragma pack (1)

typedef unsigned char 	BYTE;
typedef unsigned short 	WORD;
typedef unsigned int		DWORD;
typedef unsigned int		LONG;

typedef struct tagRGBQUAD
{
	BYTE		rgbBlue;
	BYTE		rgbGreen;
	BYTE		rgbRed;
	BYTE		rgbReserved;
} RGBQUAD;

typedef struct tagBITMAPFILEHEADER
{
	WORD		bfType;
	DWORD		bfSize;
	WORD		bfReserved1;
	WORD		bfReserved2;
	DWORD		bfOffBits;
} BITMAPFILEHEADER;

typedef struct tagBITMAPCOREHEADER
{
	DWORD		bcSize;
	WORD		bcWidth;
	WORD		bcHeight;
	WORD		bcPlanes;
	WORD		bcBitCount;
} BITMAPCOREHEADER;

typedef struct tagBITMAPINFOHEADER
{
	DWORD		biSize;
	LONG		biWidth;
	LONG		biHeight;
	WORD		biPlanes;
	WORD		biBitCount;
	DWORD		biCompression;
	DWORD		biSizeImage;
	LONG		biXPelsPerMeter;
	LONG		biYPelsPerMeter;
	DWORD		biClrUsed;
	DWORD		biClrImportant;
} BITMAPINFOHEADER;

typedef struct tagRGBTRIPLE
{
	BYTE		rgbtBlue;
	BYTE		rgbtGreen;
	BYTE		rgbtRed;
} RGBTRIPLE;

#define BI_RGB				0L
#define BI_RLE8			1L
#define BI_RLE4			2L
#define BI_BITFIELDS	3L

typedef long		FXPT2DOT30;

typedef struct tagCIEXYZ
{
	FXPT2DOT30		ciexyzX;
	FXPT2DOT30		ciexyzY;
	FXPT2DOT30		ciexyzZ;
} CIEXYZ;

typedef struct tagCIEXYZTRIPLE
{
	CIEXYZ		ciexyzRed;
	CIEXYZ		ciexyzGreen;
	CIEXYZ		ciexyzBlue;
} CIEXYZTRIPLE;

typedef struct tagBITMAPV4HEADER
{
	DWORD				bV4Size;
	LONG				bV4Width;
	LONG				bV4Height;
	WORD				bV4Planes;
	WORD				bV4BitCount;
	DWORD				bV4V4Compression;
	DWORD				bV4SizeImage;
	LONG				bV4XPelsPerMeter;
	LONG				bV4YPelsPerMeter;
	DWORD				bV4ClrUsed;
	DWORD				bV4ClrImportant;
	DWORD				bV4RedMask;
	DWORD				bV4GreenMask;
	DWORD				bV4BlueMask;
	DWORD				bV4AlphaMask;
	DWORD				bV4CSType;
	CIEXYZTRIPLE	bV4Endpoints;
	DWORD				bV4GammaRed;
	DWORD				bV4GammaGreen;
	DWORD				bV4GammaBlue;
} BITMAPV4HEADER;

typedef LONG	HFILE;
typedef LONG	HANDLE;

#define OFS_MAXPATHNAME		128
#define OF_READ						0
typedef struct _OFSTRUCT
{
	BYTE		cBytes;
	BYTE		fFixedDisk;
	WORD	nErrCode;
	WORD	Reserved1;
	WORD	Reserved2;
	char		szPathName[OFS_MAXPATHNAME];
} OFSTRUCT;

#pragma pack (4)

#endif
